package com.cskaoyan.day3;

import java.util.Scanner;

public class LoginTest {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int count=3;
        while(count!=0){
            System.out.println("请输入账号和密码，还剩有"+count+"次机会可以重新输入");
            String username = sc.nextLine();
            String password = sc.nextLine();
            if("admin".equals(username) && "123456".equals(password)){
                System.out.println("登陆成功!");
                return;
            }
            count--;
        }
        System.out.println("登陆失败,锁定账户！");
    }
}
